{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:06:29.998166Z",
     "start_time": "2019-11-06T08:06:24.887778Z"
    }
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.计算布尔值统计信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:07:38.420327Z",
     "start_time": "2019-10-31T06:07:38.167998Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>director_name</th>\n",
       "      <th>num_critic_for_reviews</th>\n",
       "      <th>duration</th>\n",
       "      <th>director_facebook_likes</th>\n",
       "      <th>actor_3_facebook_likes</th>\n",
       "      <th>actor_2_name</th>\n",
       "      <th>actor_1_facebook_likes</th>\n",
       "      <th>gross</th>\n",
       "      <th>genres</th>\n",
       "      <th>actor_1_name</th>\n",
       "      <th>num_voted_users</th>\n",
       "      <th>cast_total_facebook_likes</th>\n",
       "      <th>actor_3_name</th>\n",
       "      <th>facenumber_in_poster</th>\n",
       "      <th>plot_keywords</th>\n",
       "      <th>movie_imdb_link</th>\n",
       "      <th>num_user_for_reviews</th>\n",
       "      <th>language</th>\n",
       "      <th>country</th>\n",
       "      <th>content_rating</th>\n",
       "      <th>budget</th>\n",
       "      <th>title_year</th>\n",
       "      <th>actor_2_facebook_likes</th>\n",
       "      <th>imdb_score</th>\n",
       "      <th>aspect_ratio</th>\n",
       "      <th>movie_facebook_likes</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>movie_title</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Avatar</th>\n",
       "      <td>Color</td>\n",
       "      <td>James Cameron</td>\n",
       "      <td>723.0</td>\n",
       "      <td>178.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>855.0</td>\n",
       "      <td>Joel David Moore</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>760505847.0</td>\n",
       "      <td>Action|Adventure|Fantasy|Sci-Fi</td>\n",
       "      <td>CCH Pounder</td>\n",
       "      <td>886204</td>\n",
       "      <td>4834</td>\n",
       "      <td>Wes Studi</td>\n",
       "      <td>0.0</td>\n",
       "      <td>avatar|future|marine|native|paraplegic</td>\n",
       "      <td>http://www.imdb.com/title/tt0499549/?ref_=fn_t...</td>\n",
       "      <td>3054.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>237000000.0</td>\n",
       "      <td>2009.0</td>\n",
       "      <td>936.0</td>\n",
       "      <td>7.9</td>\n",
       "      <td>1.78</td>\n",
       "      <td>33000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Pirates of the Caribbean: At World's End</th>\n",
       "      <td>Color</td>\n",
       "      <td>Gore Verbinski</td>\n",
       "      <td>302.0</td>\n",
       "      <td>169.0</td>\n",
       "      <td>563.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>Orlando Bloom</td>\n",
       "      <td>40000.0</td>\n",
       "      <td>309404152.0</td>\n",
       "      <td>Action|Adventure|Fantasy</td>\n",
       "      <td>Johnny Depp</td>\n",
       "      <td>471220</td>\n",
       "      <td>48350</td>\n",
       "      <td>Jack Davenport</td>\n",
       "      <td>0.0</td>\n",
       "      <td>goddess|marriage ceremony|marriage proposal|pi...</td>\n",
       "      <td>http://www.imdb.com/title/tt0449088/?ref_=fn_t...</td>\n",
       "      <td>1238.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>300000000.0</td>\n",
       "      <td>2007.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>7.1</td>\n",
       "      <td>2.35</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Spectre</th>\n",
       "      <td>Color</td>\n",
       "      <td>Sam Mendes</td>\n",
       "      <td>602.0</td>\n",
       "      <td>148.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>161.0</td>\n",
       "      <td>Rory Kinnear</td>\n",
       "      <td>11000.0</td>\n",
       "      <td>200074175.0</td>\n",
       "      <td>Action|Adventure|Thriller</td>\n",
       "      <td>Christoph Waltz</td>\n",
       "      <td>275868</td>\n",
       "      <td>11700</td>\n",
       "      <td>Stephanie Sigman</td>\n",
       "      <td>1.0</td>\n",
       "      <td>bomb|espionage|sequel|spy|terrorist</td>\n",
       "      <td>http://www.imdb.com/title/tt2379713/?ref_=fn_t...</td>\n",
       "      <td>994.0</td>\n",
       "      <td>English</td>\n",
       "      <td>UK</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>245000000.0</td>\n",
       "      <td>2015.0</td>\n",
       "      <td>393.0</td>\n",
       "      <td>6.8</td>\n",
       "      <td>2.35</td>\n",
       "      <td>85000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>The Dark Knight Rises</th>\n",
       "      <td>Color</td>\n",
       "      <td>Christopher Nolan</td>\n",
       "      <td>813.0</td>\n",
       "      <td>164.0</td>\n",
       "      <td>22000.0</td>\n",
       "      <td>23000.0</td>\n",
       "      <td>Christian Bale</td>\n",
       "      <td>27000.0</td>\n",
       "      <td>448130642.0</td>\n",
       "      <td>Action|Thriller</td>\n",
       "      <td>Tom Hardy</td>\n",
       "      <td>1144337</td>\n",
       "      <td>106759</td>\n",
       "      <td>Joseph Gordon-Levitt</td>\n",
       "      <td>0.0</td>\n",
       "      <td>deception|imprisonment|lawlessness|police offi...</td>\n",
       "      <td>http://www.imdb.com/title/tt1345836/?ref_=fn_t...</td>\n",
       "      <td>2701.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>250000000.0</td>\n",
       "      <td>2012.0</td>\n",
       "      <td>23000.0</td>\n",
       "      <td>8.5</td>\n",
       "      <td>2.35</td>\n",
       "      <td>164000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode VII - The Force Awakens</th>\n",
       "      <td>NaN</td>\n",
       "      <td>Doug Walker</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>131.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Rob Walker</td>\n",
       "      <td>131.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Documentary</td>\n",
       "      <td>Doug Walker</td>\n",
       "      <td>8</td>\n",
       "      <td>143</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>http://www.imdb.com/title/tt5289954/?ref_=fn_t...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>12.0</td>\n",
       "      <td>7.1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            color      director_name  \\\n",
       "movie_title                                                            \n",
       "Avatar                                      Color      James Cameron   \n",
       "Pirates of the Caribbean: At World's End    Color     Gore Verbinski   \n",
       "Spectre                                     Color         Sam Mendes   \n",
       "The Dark Knight Rises                       Color  Christopher Nolan   \n",
       "Star Wars: Episode VII - The Force Awakens    NaN        Doug Walker   \n",
       "\n",
       "                                            num_critic_for_reviews  duration  \\\n",
       "movie_title                                                                    \n",
       "Avatar                                                       723.0     178.0   \n",
       "Pirates of the Caribbean: At World's End                     302.0     169.0   \n",
       "Spectre                                                      602.0     148.0   \n",
       "The Dark Knight Rises                                        813.0     164.0   \n",
       "Star Wars: Episode VII - The Force Awakens                     NaN       NaN   \n",
       "\n",
       "                                            director_facebook_likes  \\\n",
       "movie_title                                                           \n",
       "Avatar                                                          0.0   \n",
       "Pirates of the Caribbean: At World's End                      563.0   \n",
       "Spectre                                                         0.0   \n",
       "The Dark Knight Rises                                       22000.0   \n",
       "Star Wars: Episode VII - The Force Awakens                    131.0   \n",
       "\n",
       "                                            actor_3_facebook_likes  \\\n",
       "movie_title                                                          \n",
       "Avatar                                                       855.0   \n",
       "Pirates of the Caribbean: At World's End                    1000.0   \n",
       "Spectre                                                      161.0   \n",
       "The Dark Knight Rises                                      23000.0   \n",
       "Star Wars: Episode VII - The Force Awakens                     NaN   \n",
       "\n",
       "                                                actor_2_name  \\\n",
       "movie_title                                                    \n",
       "Avatar                                      Joel David Moore   \n",
       "Pirates of the Caribbean: At World's End       Orlando Bloom   \n",
       "Spectre                                         Rory Kinnear   \n",
       "The Dark Knight Rises                         Christian Bale   \n",
       "Star Wars: Episode VII - The Force Awakens        Rob Walker   \n",
       "\n",
       "                                            actor_1_facebook_likes  \\\n",
       "movie_title                                                          \n",
       "Avatar                                                      1000.0   \n",
       "Pirates of the Caribbean: At World's End                   40000.0   \n",
       "Spectre                                                    11000.0   \n",
       "The Dark Knight Rises                                      27000.0   \n",
       "Star Wars: Episode VII - The Force Awakens                   131.0   \n",
       "\n",
       "                                                  gross  \\\n",
       "movie_title                                               \n",
       "Avatar                                      760505847.0   \n",
       "Pirates of the Caribbean: At World's End    309404152.0   \n",
       "Spectre                                     200074175.0   \n",
       "The Dark Knight Rises                       448130642.0   \n",
       "Star Wars: Episode VII - The Force Awakens          NaN   \n",
       "\n",
       "                                                                     genres  \\\n",
       "movie_title                                                                   \n",
       "Avatar                                      Action|Adventure|Fantasy|Sci-Fi   \n",
       "Pirates of the Caribbean: At World's End           Action|Adventure|Fantasy   \n",
       "Spectre                                           Action|Adventure|Thriller   \n",
       "The Dark Knight Rises                                       Action|Thriller   \n",
       "Star Wars: Episode VII - The Force Awakens                      Documentary   \n",
       "\n",
       "                                               actor_1_name  num_voted_users  \\\n",
       "movie_title                                                                    \n",
       "Avatar                                          CCH Pounder           886204   \n",
       "Pirates of the Caribbean: At World's End        Johnny Depp           471220   \n",
       "Spectre                                     Christoph Waltz           275868   \n",
       "The Dark Knight Rises                             Tom Hardy          1144337   \n",
       "Star Wars: Episode VII - The Force Awakens      Doug Walker                8   \n",
       "\n",
       "                                            cast_total_facebook_likes  \\\n",
       "movie_title                                                             \n",
       "Avatar                                                           4834   \n",
       "Pirates of the Caribbean: At World's End                        48350   \n",
       "Spectre                                                         11700   \n",
       "The Dark Knight Rises                                          106759   \n",
       "Star Wars: Episode VII - The Force Awakens                        143   \n",
       "\n",
       "                                                    actor_3_name  \\\n",
       "movie_title                                                        \n",
       "Avatar                                                 Wes Studi   \n",
       "Pirates of the Caribbean: At World's End          Jack Davenport   \n",
       "Spectre                                         Stephanie Sigman   \n",
       "The Dark Knight Rises                       Joseph Gordon-Levitt   \n",
       "Star Wars: Episode VII - The Force Awakens                   NaN   \n",
       "\n",
       "                                            facenumber_in_poster  \\\n",
       "movie_title                                                        \n",
       "Avatar                                                       0.0   \n",
       "Pirates of the Caribbean: At World's End                     0.0   \n",
       "Spectre                                                      1.0   \n",
       "The Dark Knight Rises                                        0.0   \n",
       "Star Wars: Episode VII - The Force Awakens                   0.0   \n",
       "\n",
       "                                                                                plot_keywords  \\\n",
       "movie_title                                                                                     \n",
       "Avatar                                                 avatar|future|marine|native|paraplegic   \n",
       "Pirates of the Caribbean: At World's End    goddess|marriage ceremony|marriage proposal|pi...   \n",
       "Spectre                                                   bomb|espionage|sequel|spy|terrorist   \n",
       "The Dark Knight Rises                       deception|imprisonment|lawlessness|police offi...   \n",
       "Star Wars: Episode VII - The Force Awakens                                                NaN   \n",
       "\n",
       "                                                                              movie_imdb_link  \\\n",
       "movie_title                                                                                     \n",
       "Avatar                                      http://www.imdb.com/title/tt0499549/?ref_=fn_t...   \n",
       "Pirates of the Caribbean: At World's End    http://www.imdb.com/title/tt0449088/?ref_=fn_t...   \n",
       "Spectre                                     http://www.imdb.com/title/tt2379713/?ref_=fn_t...   \n",
       "The Dark Knight Rises                       http://www.imdb.com/title/tt1345836/?ref_=fn_t...   \n",
       "Star Wars: Episode VII - The Force Awakens  http://www.imdb.com/title/tt5289954/?ref_=fn_t...   \n",
       "\n",
       "                                            num_user_for_reviews language  \\\n",
       "movie_title                                                                 \n",
       "Avatar                                                    3054.0  English   \n",
       "Pirates of the Caribbean: At World's End                  1238.0  English   \n",
       "Spectre                                                    994.0  English   \n",
       "The Dark Knight Rises                                     2701.0  English   \n",
       "Star Wars: Episode VII - The Force Awakens                   NaN      NaN   \n",
       "\n",
       "                                           country content_rating  \\\n",
       "movie_title                                                         \n",
       "Avatar                                         USA          PG-13   \n",
       "Pirates of the Caribbean: At World's End       USA          PG-13   \n",
       "Spectre                                         UK          PG-13   \n",
       "The Dark Knight Rises                          USA          PG-13   \n",
       "Star Wars: Episode VII - The Force Awakens     NaN            NaN   \n",
       "\n",
       "                                                 budget  title_year  \\\n",
       "movie_title                                                           \n",
       "Avatar                                      237000000.0      2009.0   \n",
       "Pirates of the Caribbean: At World's End    300000000.0      2007.0   \n",
       "Spectre                                     245000000.0      2015.0   \n",
       "The Dark Knight Rises                       250000000.0      2012.0   \n",
       "Star Wars: Episode VII - The Force Awakens          NaN         NaN   \n",
       "\n",
       "                                            actor_2_facebook_likes  \\\n",
       "movie_title                                                          \n",
       "Avatar                                                       936.0   \n",
       "Pirates of the Caribbean: At World's End                    5000.0   \n",
       "Spectre                                                      393.0   \n",
       "The Dark Knight Rises                                      23000.0   \n",
       "Star Wars: Episode VII - The Force Awakens                    12.0   \n",
       "\n",
       "                                            imdb_score  aspect_ratio  \\\n",
       "movie_title                                                            \n",
       "Avatar                                             7.9          1.78   \n",
       "Pirates of the Caribbean: At World's End           7.1          2.35   \n",
       "Spectre                                            6.8          2.35   \n",
       "The Dark Knight Rises                              8.5          2.35   \n",
       "Star Wars: Episode VII - The Force Awakens         7.1           NaN   \n",
       "\n",
       "                                            movie_facebook_likes  \n",
       "movie_title                                                       \n",
       "Avatar                                                     33000  \n",
       "Pirates of the Caribbean: At World's End                       0  \n",
       "Spectre                                                    85000  \n",
       "The Dark Knight Rises                                     164000  \n",
       "Star Wars: Episode VII - The Force Awakens                     0  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 读取movie，设定行索引是movie_title\n",
    "pd.options.display.max_columns = 50\n",
    "movie = pd.read_csv('data/movie.csv', index_col='movie_title')\n",
    "movie.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:09:14.463832Z",
     "start_time": "2019-10-31T06:09:14.455853Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "movie_title\n",
       "Avatar                                         True\n",
       "Pirates of the Caribbean: At World's End       True\n",
       "Spectre                                        True\n",
       "The Dark Knight Rises                          True\n",
       "Star Wars: Episode VII - The Force Awakens    False\n",
       "John Carter                                    True\n",
       "Spider-Man 3                                   True\n",
       "Tangled                                       False\n",
       "Avengers: Age of Ultron                        True\n",
       "Harry Potter and the Half-Blood Prince         True\n",
       "Name: duration, dtype: bool"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 判断电影时长是否超过两小时\n",
    "movie_2_hours = movie['duration'] > 120\n",
    "movie_2_hours.head(10)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:10:03.327222Z",
     "start_time": "2019-10-31T06:10:03.320243Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1039"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 有多少时长超过两小时的电影\n",
    "movie_2_hours.sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:10:22.926772Z",
     "start_time": "2019-10-31T06:10:22.917797Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.2113506916192026"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie_2_hours.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:10:59.748502Z",
     "start_time": "2019-10-31T06:10:59.727556Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count      4916\n",
       "unique        2\n",
       "top       False\n",
       "freq       3877\n",
       "Name: duration, dtype: object"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie_2_hours.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:12:54.673673Z",
     "start_time": "2019-10-31T06:12:54.659712Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "15"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie['duration'].isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:13:23.034612Z",
     "start_time": "2019-10-31T06:13:23.022611Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.21199755152009794"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie['duration'].dropna().gt(120).mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 原理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:14:21.961286Z",
     "start_time": "2019-10-31T06:14:21.849585Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False    0.788649\n",
       "True     0.211351\n",
       "Name: duration, dtype: float64"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie_2_hours.value_counts(normalize=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 更多"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:16:35.227923Z",
     "start_time": "2019-10-31T06:16:35.211965Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9777687130328371"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "actor = movie[['actor_1_facebook_likes', 'actor_2_facebook_likes']].dropna()\n",
    "(actor['actor_1_facebook_likes'] > actor['actor_2_facebook_likes']).mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.构建多个布尔条件"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:17:29.997435Z",
     "start_time": "2019-10-31T06:17:29.815920Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>director_name</th>\n",
       "      <th>num_critic_for_reviews</th>\n",
       "      <th>duration</th>\n",
       "      <th>director_facebook_likes</th>\n",
       "      <th>actor_3_facebook_likes</th>\n",
       "      <th>actor_2_name</th>\n",
       "      <th>actor_1_facebook_likes</th>\n",
       "      <th>gross</th>\n",
       "      <th>genres</th>\n",
       "      <th>actor_1_name</th>\n",
       "      <th>num_voted_users</th>\n",
       "      <th>cast_total_facebook_likes</th>\n",
       "      <th>actor_3_name</th>\n",
       "      <th>facenumber_in_poster</th>\n",
       "      <th>plot_keywords</th>\n",
       "      <th>movie_imdb_link</th>\n",
       "      <th>num_user_for_reviews</th>\n",
       "      <th>language</th>\n",
       "      <th>country</th>\n",
       "      <th>content_rating</th>\n",
       "      <th>budget</th>\n",
       "      <th>title_year</th>\n",
       "      <th>actor_2_facebook_likes</th>\n",
       "      <th>imdb_score</th>\n",
       "      <th>aspect_ratio</th>\n",
       "      <th>movie_facebook_likes</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>movie_title</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Avatar</th>\n",
       "      <td>Color</td>\n",
       "      <td>James Cameron</td>\n",
       "      <td>723.0</td>\n",
       "      <td>178.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>855.0</td>\n",
       "      <td>Joel David Moore</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>760505847.0</td>\n",
       "      <td>Action|Adventure|Fantasy|Sci-Fi</td>\n",
       "      <td>CCH Pounder</td>\n",
       "      <td>886204</td>\n",
       "      <td>4834</td>\n",
       "      <td>Wes Studi</td>\n",
       "      <td>0.0</td>\n",
       "      <td>avatar|future|marine|native|paraplegic</td>\n",
       "      <td>http://www.imdb.com/title/tt0499549/?ref_=fn_t...</td>\n",
       "      <td>3054.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>237000000.0</td>\n",
       "      <td>2009.0</td>\n",
       "      <td>936.0</td>\n",
       "      <td>7.9</td>\n",
       "      <td>1.78</td>\n",
       "      <td>33000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Pirates of the Caribbean: At World's End</th>\n",
       "      <td>Color</td>\n",
       "      <td>Gore Verbinski</td>\n",
       "      <td>302.0</td>\n",
       "      <td>169.0</td>\n",
       "      <td>563.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>Orlando Bloom</td>\n",
       "      <td>40000.0</td>\n",
       "      <td>309404152.0</td>\n",
       "      <td>Action|Adventure|Fantasy</td>\n",
       "      <td>Johnny Depp</td>\n",
       "      <td>471220</td>\n",
       "      <td>48350</td>\n",
       "      <td>Jack Davenport</td>\n",
       "      <td>0.0</td>\n",
       "      <td>goddess|marriage ceremony|marriage proposal|pi...</td>\n",
       "      <td>http://www.imdb.com/title/tt0449088/?ref_=fn_t...</td>\n",
       "      <td>1238.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>300000000.0</td>\n",
       "      <td>2007.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>7.1</td>\n",
       "      <td>2.35</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Spectre</th>\n",
       "      <td>Color</td>\n",
       "      <td>Sam Mendes</td>\n",
       "      <td>602.0</td>\n",
       "      <td>148.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>161.0</td>\n",
       "      <td>Rory Kinnear</td>\n",
       "      <td>11000.0</td>\n",
       "      <td>200074175.0</td>\n",
       "      <td>Action|Adventure|Thriller</td>\n",
       "      <td>Christoph Waltz</td>\n",
       "      <td>275868</td>\n",
       "      <td>11700</td>\n",
       "      <td>Stephanie Sigman</td>\n",
       "      <td>1.0</td>\n",
       "      <td>bomb|espionage|sequel|spy|terrorist</td>\n",
       "      <td>http://www.imdb.com/title/tt2379713/?ref_=fn_t...</td>\n",
       "      <td>994.0</td>\n",
       "      <td>English</td>\n",
       "      <td>UK</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>245000000.0</td>\n",
       "      <td>2015.0</td>\n",
       "      <td>393.0</td>\n",
       "      <td>6.8</td>\n",
       "      <td>2.35</td>\n",
       "      <td>85000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>The Dark Knight Rises</th>\n",
       "      <td>Color</td>\n",
       "      <td>Christopher Nolan</td>\n",
       "      <td>813.0</td>\n",
       "      <td>164.0</td>\n",
       "      <td>22000.0</td>\n",
       "      <td>23000.0</td>\n",
       "      <td>Christian Bale</td>\n",
       "      <td>27000.0</td>\n",
       "      <td>448130642.0</td>\n",
       "      <td>Action|Thriller</td>\n",
       "      <td>Tom Hardy</td>\n",
       "      <td>1144337</td>\n",
       "      <td>106759</td>\n",
       "      <td>Joseph Gordon-Levitt</td>\n",
       "      <td>0.0</td>\n",
       "      <td>deception|imprisonment|lawlessness|police offi...</td>\n",
       "      <td>http://www.imdb.com/title/tt1345836/?ref_=fn_t...</td>\n",
       "      <td>2701.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>250000000.0</td>\n",
       "      <td>2012.0</td>\n",
       "      <td>23000.0</td>\n",
       "      <td>8.5</td>\n",
       "      <td>2.35</td>\n",
       "      <td>164000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode VII - The Force Awakens</th>\n",
       "      <td>NaN</td>\n",
       "      <td>Doug Walker</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>131.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Rob Walker</td>\n",
       "      <td>131.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Documentary</td>\n",
       "      <td>Doug Walker</td>\n",
       "      <td>8</td>\n",
       "      <td>143</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>http://www.imdb.com/title/tt5289954/?ref_=fn_t...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>12.0</td>\n",
       "      <td>7.1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            color      director_name  \\\n",
       "movie_title                                                            \n",
       "Avatar                                      Color      James Cameron   \n",
       "Pirates of the Caribbean: At World's End    Color     Gore Verbinski   \n",
       "Spectre                                     Color         Sam Mendes   \n",
       "The Dark Knight Rises                       Color  Christopher Nolan   \n",
       "Star Wars: Episode VII - The Force Awakens    NaN        Doug Walker   \n",
       "\n",
       "                                            num_critic_for_reviews  duration  \\\n",
       "movie_title                                                                    \n",
       "Avatar                                                       723.0     178.0   \n",
       "Pirates of the Caribbean: At World's End                     302.0     169.0   \n",
       "Spectre                                                      602.0     148.0   \n",
       "The Dark Knight Rises                                        813.0     164.0   \n",
       "Star Wars: Episode VII - The Force Awakens                     NaN       NaN   \n",
       "\n",
       "                                            director_facebook_likes  \\\n",
       "movie_title                                                           \n",
       "Avatar                                                          0.0   \n",
       "Pirates of the Caribbean: At World's End                      563.0   \n",
       "Spectre                                                         0.0   \n",
       "The Dark Knight Rises                                       22000.0   \n",
       "Star Wars: Episode VII - The Force Awakens                    131.0   \n",
       "\n",
       "                                            actor_3_facebook_likes  \\\n",
       "movie_title                                                          \n",
       "Avatar                                                       855.0   \n",
       "Pirates of the Caribbean: At World's End                    1000.0   \n",
       "Spectre                                                      161.0   \n",
       "The Dark Knight Rises                                      23000.0   \n",
       "Star Wars: Episode VII - The Force Awakens                     NaN   \n",
       "\n",
       "                                                actor_2_name  \\\n",
       "movie_title                                                    \n",
       "Avatar                                      Joel David Moore   \n",
       "Pirates of the Caribbean: At World's End       Orlando Bloom   \n",
       "Spectre                                         Rory Kinnear   \n",
       "The Dark Knight Rises                         Christian Bale   \n",
       "Star Wars: Episode VII - The Force Awakens        Rob Walker   \n",
       "\n",
       "                                            actor_1_facebook_likes  \\\n",
       "movie_title                                                          \n",
       "Avatar                                                      1000.0   \n",
       "Pirates of the Caribbean: At World's End                   40000.0   \n",
       "Spectre                                                    11000.0   \n",
       "The Dark Knight Rises                                      27000.0   \n",
       "Star Wars: Episode VII - The Force Awakens                   131.0   \n",
       "\n",
       "                                                  gross  \\\n",
       "movie_title                                               \n",
       "Avatar                                      760505847.0   \n",
       "Pirates of the Caribbean: At World's End    309404152.0   \n",
       "Spectre                                     200074175.0   \n",
       "The Dark Knight Rises                       448130642.0   \n",
       "Star Wars: Episode VII - The Force Awakens          NaN   \n",
       "\n",
       "                                                                     genres  \\\n",
       "movie_title                                                                   \n",
       "Avatar                                      Action|Adventure|Fantasy|Sci-Fi   \n",
       "Pirates of the Caribbean: At World's End           Action|Adventure|Fantasy   \n",
       "Spectre                                           Action|Adventure|Thriller   \n",
       "The Dark Knight Rises                                       Action|Thriller   \n",
       "Star Wars: Episode VII - The Force Awakens                      Documentary   \n",
       "\n",
       "                                               actor_1_name  num_voted_users  \\\n",
       "movie_title                                                                    \n",
       "Avatar                                          CCH Pounder           886204   \n",
       "Pirates of the Caribbean: At World's End        Johnny Depp           471220   \n",
       "Spectre                                     Christoph Waltz           275868   \n",
       "The Dark Knight Rises                             Tom Hardy          1144337   \n",
       "Star Wars: Episode VII - The Force Awakens      Doug Walker                8   \n",
       "\n",
       "                                            cast_total_facebook_likes  \\\n",
       "movie_title                                                             \n",
       "Avatar                                                           4834   \n",
       "Pirates of the Caribbean: At World's End                        48350   \n",
       "Spectre                                                         11700   \n",
       "The Dark Knight Rises                                          106759   \n",
       "Star Wars: Episode VII - The Force Awakens                        143   \n",
       "\n",
       "                                                    actor_3_name  \\\n",
       "movie_title                                                        \n",
       "Avatar                                                 Wes Studi   \n",
       "Pirates of the Caribbean: At World's End          Jack Davenport   \n",
       "Spectre                                         Stephanie Sigman   \n",
       "The Dark Knight Rises                       Joseph Gordon-Levitt   \n",
       "Star Wars: Episode VII - The Force Awakens                   NaN   \n",
       "\n",
       "                                            facenumber_in_poster  \\\n",
       "movie_title                                                        \n",
       "Avatar                                                       0.0   \n",
       "Pirates of the Caribbean: At World's End                     0.0   \n",
       "Spectre                                                      1.0   \n",
       "The Dark Knight Rises                                        0.0   \n",
       "Star Wars: Episode VII - The Force Awakens                   0.0   \n",
       "\n",
       "                                                                                plot_keywords  \\\n",
       "movie_title                                                                                     \n",
       "Avatar                                                 avatar|future|marine|native|paraplegic   \n",
       "Pirates of the Caribbean: At World's End    goddess|marriage ceremony|marriage proposal|pi...   \n",
       "Spectre                                                   bomb|espionage|sequel|spy|terrorist   \n",
       "The Dark Knight Rises                       deception|imprisonment|lawlessness|police offi...   \n",
       "Star Wars: Episode VII - The Force Awakens                                                NaN   \n",
       "\n",
       "                                                                              movie_imdb_link  \\\n",
       "movie_title                                                                                     \n",
       "Avatar                                      http://www.imdb.com/title/tt0499549/?ref_=fn_t...   \n",
       "Pirates of the Caribbean: At World's End    http://www.imdb.com/title/tt0449088/?ref_=fn_t...   \n",
       "Spectre                                     http://www.imdb.com/title/tt2379713/?ref_=fn_t...   \n",
       "The Dark Knight Rises                       http://www.imdb.com/title/tt1345836/?ref_=fn_t...   \n",
       "Star Wars: Episode VII - The Force Awakens  http://www.imdb.com/title/tt5289954/?ref_=fn_t...   \n",
       "\n",
       "                                            num_user_for_reviews language  \\\n",
       "movie_title                                                                 \n",
       "Avatar                                                    3054.0  English   \n",
       "Pirates of the Caribbean: At World's End                  1238.0  English   \n",
       "Spectre                                                    994.0  English   \n",
       "The Dark Knight Rises                                     2701.0  English   \n",
       "Star Wars: Episode VII - The Force Awakens                   NaN      NaN   \n",
       "\n",
       "                                           country content_rating  \\\n",
       "movie_title                                                         \n",
       "Avatar                                         USA          PG-13   \n",
       "Pirates of the Caribbean: At World's End       USA          PG-13   \n",
       "Spectre                                         UK          PG-13   \n",
       "The Dark Knight Rises                          USA          PG-13   \n",
       "Star Wars: Episode VII - The Force Awakens     NaN            NaN   \n",
       "\n",
       "                                                 budget  title_year  \\\n",
       "movie_title                                                           \n",
       "Avatar                                      237000000.0      2009.0   \n",
       "Pirates of the Caribbean: At World's End    300000000.0      2007.0   \n",
       "Spectre                                     245000000.0      2015.0   \n",
       "The Dark Knight Rises                       250000000.0      2012.0   \n",
       "Star Wars: Episode VII - The Force Awakens          NaN         NaN   \n",
       "\n",
       "                                            actor_2_facebook_likes  \\\n",
       "movie_title                                                          \n",
       "Avatar                                                       936.0   \n",
       "Pirates of the Caribbean: At World's End                    5000.0   \n",
       "Spectre                                                      393.0   \n",
       "The Dark Knight Rises                                      23000.0   \n",
       "Star Wars: Episode VII - The Force Awakens                    12.0   \n",
       "\n",
       "                                            imdb_score  aspect_ratio  \\\n",
       "movie_title                                                            \n",
       "Avatar                                             7.9          1.78   \n",
       "Pirates of the Caribbean: At World's End           7.1          2.35   \n",
       "Spectre                                            6.8          2.35   \n",
       "The Dark Knight Rises                              8.5          2.35   \n",
       "Star Wars: Episode VII - The Force Awakens         7.1           NaN   \n",
       "\n",
       "                                            movie_facebook_likes  \n",
       "movie_title                                                       \n",
       "Avatar                                                     33000  \n",
       "Pirates of the Caribbean: At World's End                       0  \n",
       "Spectre                                                    85000  \n",
       "The Dark Knight Rises                                     164000  \n",
       "Star Wars: Episode VII - The Force Awakens                     0  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie = pd.read_csv('data/movie.csv', index_col='movie_title')\n",
    "movie.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:19:36.908957Z",
     "start_time": "2019-10-31T06:19:36.893998Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "movie_title\n",
       "Avatar                                         True\n",
       "Pirates of the Caribbean: At World's End       True\n",
       "Spectre                                        True\n",
       "The Dark Knight Rises                          True\n",
       "Star Wars: Episode VII - The Force Awakens    False\n",
       "Name: content_rating, dtype: bool"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "criteria1 = movie.imdb_score > 8\n",
    "criteria2 = movie.content_rating == 'PG-13'\n",
    "criteria3 = (movie.title_year < 2000) | (movie.title_year > 2010)\n",
    "criteria2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:20:28.693337Z",
     "start_time": "2019-10-31T06:20:28.679371Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "movie_title\n",
       "Avatar                                        False\n",
       "Pirates of the Caribbean: At World's End      False\n",
       "Spectre                                       False\n",
       "The Dark Knight Rises                          True\n",
       "Star Wars: Episode VII - The Force Awakens    False\n",
       "dtype: bool"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "criteria_final = criteria1 & criteria2 & criteria3\n",
    "criteria_final.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 更多"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:21:38.950470Z",
     "start_time": "2019-10-31T06:21:38.913563Z"
    }
   },
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "cannot compare a dtyped [float64] array with a scalar of type [bool]",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32mC:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\ops.py\u001b[0m in \u001b[0;36mna_op\u001b[1;34m(x, y)\u001b[0m\n\u001b[0;32m   1788\u001b[0m         \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1789\u001b[1;33m             \u001b[0mresult\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mop\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0my\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1790\u001b[0m         \u001b[1;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\ops.py\u001b[0m in \u001b[0;36mror_\u001b[1;34m(left, right)\u001b[0m\n\u001b[0;32m    190\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mror_\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mleft\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mright\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 191\u001b[1;33m     \u001b[1;32mreturn\u001b[0m \u001b[0moperator\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mor_\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mright\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mleft\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    192\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mTypeError\u001b[0m: ufunc 'bitwise_or' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001b[1;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[1;32mC:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\ops.py\u001b[0m in \u001b[0;36mna_op\u001b[1;34m(x, y)\u001b[0m\n\u001b[0;32m   1803\u001b[0m                 \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1804\u001b[1;33m                     \u001b[0mresult\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlibops\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mscalar_binop\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0my\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mop\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1805\u001b[0m                 except (TypeError, ValueError, AttributeError,\n",
      "\u001b[1;32mpandas/_libs/ops.pyx\u001b[0m in \u001b[0;36mpandas._libs.ops.scalar_binop\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;31mValueError\u001b[0m: Buffer dtype mismatch, expected 'Python object' but got 'double'",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-20-8d7f69a8e577>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mmovie\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtitle_year\u001b[0m \u001b[1;33m<\u001b[0m \u001b[1;36m2000\u001b[0m \u001b[1;33m|\u001b[0m \u001b[0mmovie\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtitle_year\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m2009\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mC:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\ops.py\u001b[0m in \u001b[0;36mwrapper\u001b[1;34m(self, other)\u001b[0m\n\u001b[0;32m   1848\u001b[0m         filler = (fill_int if is_self_int_dtype and is_other_int_dtype\n\u001b[0;32m   1849\u001b[0m                   else fill_bool)\n\u001b[1;32m-> 1850\u001b[1;33m         \u001b[0mres_values\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mna_op\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0movalues\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1851\u001b[0m         unfilled = self._constructor(res_values,\n\u001b[0;32m   1852\u001b[0m                                      index=self.index, name=res_name)\n",
      "\u001b[1;32mC:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\ops.py\u001b[0m in \u001b[0;36mna_op\u001b[1;34m(x, y)\u001b[0m\n\u001b[0;32m   1808\u001b[0m                                     \u001b[1;34m\"with a scalar of type [{typ}]\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1809\u001b[0m                                     .format(dtype=x.dtype,\n\u001b[1;32m-> 1810\u001b[1;33m                                             typ=type(y).__name__))\n\u001b[0m\u001b[0;32m   1811\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1812\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mresult\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mTypeError\u001b[0m: cannot compare a dtyped [float64] array with a scalar of type [bool]"
     ]
    }
   ],
   "source": [
    "movie.title_year < 2000 | movie.title_year > 2009"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3.用布尔索引过滤"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:30:02.023309Z",
     "start_time": "2019-10-31T06:30:01.911610Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "movie_title\n",
       "Avatar                                        False\n",
       "Pirates of the Caribbean: At World's End      False\n",
       "Spectre                                       False\n",
       "The Dark Knight Rises                          True\n",
       "Star Wars: Episode VII - The Force Awakens    False\n",
       "dtype: bool"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie = pd.read_csv('data/movie.csv', index_col='movie_title')\n",
    "\n",
    "crit_a1 = movie.imdb_score > 8\n",
    "crit_a2 = movie.content_rating == 'PG-13'\n",
    "crit_a3 = (movie.title_year < 2000) | (movie.title_year > 2009)\n",
    "final_crit_a = crit_a1 & crit_a2 & crit_a3\n",
    "\n",
    "crit_b1 = movie.imdb_score < 5\n",
    "crit_b2 = movie.content_rating == 'R'\n",
    "crit_b3 = (movie.title_year >= 2000) & (movie.title_year <= 2010)\n",
    "final_crit_b = crit_b1 & crit_b2 & crit_b3\n",
    "\n",
    "final_crit_all = final_crit_a | final_crit_b\n",
    "final_crit_all.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:30:21.435904Z",
     "start_time": "2019-10-31T06:30:21.393019Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>director_name</th>\n",
       "      <th>num_critic_for_reviews</th>\n",
       "      <th>duration</th>\n",
       "      <th>director_facebook_likes</th>\n",
       "      <th>actor_3_facebook_likes</th>\n",
       "      <th>actor_2_name</th>\n",
       "      <th>actor_1_facebook_likes</th>\n",
       "      <th>gross</th>\n",
       "      <th>genres</th>\n",
       "      <th>actor_1_name</th>\n",
       "      <th>num_voted_users</th>\n",
       "      <th>cast_total_facebook_likes</th>\n",
       "      <th>actor_3_name</th>\n",
       "      <th>facenumber_in_poster</th>\n",
       "      <th>plot_keywords</th>\n",
       "      <th>movie_imdb_link</th>\n",
       "      <th>num_user_for_reviews</th>\n",
       "      <th>language</th>\n",
       "      <th>country</th>\n",
       "      <th>content_rating</th>\n",
       "      <th>budget</th>\n",
       "      <th>title_year</th>\n",
       "      <th>actor_2_facebook_likes</th>\n",
       "      <th>imdb_score</th>\n",
       "      <th>aspect_ratio</th>\n",
       "      <th>movie_facebook_likes</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>movie_title</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>The Dark Knight Rises</th>\n",
       "      <td>Color</td>\n",
       "      <td>Christopher Nolan</td>\n",
       "      <td>813.0</td>\n",
       "      <td>164.0</td>\n",
       "      <td>22000.0</td>\n",
       "      <td>23000.0</td>\n",
       "      <td>Christian Bale</td>\n",
       "      <td>27000.0</td>\n",
       "      <td>448130642.0</td>\n",
       "      <td>Action|Thriller</td>\n",
       "      <td>Tom Hardy</td>\n",
       "      <td>1144337</td>\n",
       "      <td>106759</td>\n",
       "      <td>Joseph Gordon-Levitt</td>\n",
       "      <td>0.0</td>\n",
       "      <td>deception|imprisonment|lawlessness|police offi...</td>\n",
       "      <td>http://www.imdb.com/title/tt1345836/?ref_=fn_t...</td>\n",
       "      <td>2701.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>250000000.0</td>\n",
       "      <td>2012.0</td>\n",
       "      <td>23000.0</td>\n",
       "      <td>8.5</td>\n",
       "      <td>2.35</td>\n",
       "      <td>164000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>The Avengers</th>\n",
       "      <td>Color</td>\n",
       "      <td>Joss Whedon</td>\n",
       "      <td>703.0</td>\n",
       "      <td>173.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>19000.0</td>\n",
       "      <td>Robert Downey Jr.</td>\n",
       "      <td>26000.0</td>\n",
       "      <td>623279547.0</td>\n",
       "      <td>Action|Adventure|Sci-Fi</td>\n",
       "      <td>Chris Hemsworth</td>\n",
       "      <td>995415</td>\n",
       "      <td>87697</td>\n",
       "      <td>Scarlett Johansson</td>\n",
       "      <td>3.0</td>\n",
       "      <td>alien invasion|assassin|battle|iron man|soldier</td>\n",
       "      <td>http://www.imdb.com/title/tt0848228/?ref_=fn_t...</td>\n",
       "      <td>1722.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>220000000.0</td>\n",
       "      <td>2012.0</td>\n",
       "      <td>21000.0</td>\n",
       "      <td>8.1</td>\n",
       "      <td>1.85</td>\n",
       "      <td>123000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Captain America: Civil War</th>\n",
       "      <td>Color</td>\n",
       "      <td>Anthony Russo</td>\n",
       "      <td>516.0</td>\n",
       "      <td>147.0</td>\n",
       "      <td>94.0</td>\n",
       "      <td>11000.0</td>\n",
       "      <td>Scarlett Johansson</td>\n",
       "      <td>21000.0</td>\n",
       "      <td>407197282.0</td>\n",
       "      <td>Action|Adventure|Sci-Fi</td>\n",
       "      <td>Robert Downey Jr.</td>\n",
       "      <td>272670</td>\n",
       "      <td>64798</td>\n",
       "      <td>Chris Evans</td>\n",
       "      <td>0.0</td>\n",
       "      <td>based on comic book|knife|marvel cinematic uni...</td>\n",
       "      <td>http://www.imdb.com/title/tt3498820/?ref_=fn_t...</td>\n",
       "      <td>1022.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>250000000.0</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>19000.0</td>\n",
       "      <td>8.2</td>\n",
       "      <td>2.35</td>\n",
       "      <td>72000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Guardians of the Galaxy</th>\n",
       "      <td>Color</td>\n",
       "      <td>James Gunn</td>\n",
       "      <td>653.0</td>\n",
       "      <td>121.0</td>\n",
       "      <td>571.0</td>\n",
       "      <td>3000.0</td>\n",
       "      <td>Vin Diesel</td>\n",
       "      <td>14000.0</td>\n",
       "      <td>333130696.0</td>\n",
       "      <td>Action|Adventure|Sci-Fi</td>\n",
       "      <td>Bradley Cooper</td>\n",
       "      <td>682155</td>\n",
       "      <td>32438</td>\n",
       "      <td>Djimon Hounsou</td>\n",
       "      <td>3.0</td>\n",
       "      <td>bounty hunter|outer space|raccoon|talking anim...</td>\n",
       "      <td>http://www.imdb.com/title/tt2015381/?ref_=fn_t...</td>\n",
       "      <td>1097.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>170000000.0</td>\n",
       "      <td>2014.0</td>\n",
       "      <td>14000.0</td>\n",
       "      <td>8.1</td>\n",
       "      <td>2.35</td>\n",
       "      <td>96000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Interstellar</th>\n",
       "      <td>Color</td>\n",
       "      <td>Christopher Nolan</td>\n",
       "      <td>712.0</td>\n",
       "      <td>169.0</td>\n",
       "      <td>22000.0</td>\n",
       "      <td>6000.0</td>\n",
       "      <td>Anne Hathaway</td>\n",
       "      <td>11000.0</td>\n",
       "      <td>187991439.0</td>\n",
       "      <td>Adventure|Drama|Sci-Fi</td>\n",
       "      <td>Matthew McConaughey</td>\n",
       "      <td>928227</td>\n",
       "      <td>31488</td>\n",
       "      <td>Mackenzie Foy</td>\n",
       "      <td>1.0</td>\n",
       "      <td>black hole|father daughter relationship|saving...</td>\n",
       "      <td>http://www.imdb.com/title/tt0816692/?ref_=fn_t...</td>\n",
       "      <td>2725.0</td>\n",
       "      <td>English</td>\n",
       "      <td>USA</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>165000000.0</td>\n",
       "      <td>2014.0</td>\n",
       "      <td>11000.0</td>\n",
       "      <td>8.6</td>\n",
       "      <td>2.35</td>\n",
       "      <td>349000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                            color      director_name  num_critic_for_reviews  \\\n",
       "movie_title                                                                    \n",
       "The Dark Knight Rises       Color  Christopher Nolan                   813.0   \n",
       "The Avengers                Color        Joss Whedon                   703.0   \n",
       "Captain America: Civil War  Color      Anthony Russo                   516.0   \n",
       "Guardians of the Galaxy     Color         James Gunn                   653.0   \n",
       "Interstellar                Color  Christopher Nolan                   712.0   \n",
       "\n",
       "                            duration  director_facebook_likes  \\\n",
       "movie_title                                                     \n",
       "The Dark Knight Rises          164.0                  22000.0   \n",
       "The Avengers                   173.0                      0.0   \n",
       "Captain America: Civil War     147.0                     94.0   \n",
       "Guardians of the Galaxy        121.0                    571.0   \n",
       "Interstellar                   169.0                  22000.0   \n",
       "\n",
       "                            actor_3_facebook_likes        actor_2_name  \\\n",
       "movie_title                                                              \n",
       "The Dark Knight Rises                      23000.0      Christian Bale   \n",
       "The Avengers                               19000.0   Robert Downey Jr.   \n",
       "Captain America: Civil War                 11000.0  Scarlett Johansson   \n",
       "Guardians of the Galaxy                     3000.0          Vin Diesel   \n",
       "Interstellar                                6000.0       Anne Hathaway   \n",
       "\n",
       "                            actor_1_facebook_likes        gross  \\\n",
       "movie_title                                                       \n",
       "The Dark Knight Rises                      27000.0  448130642.0   \n",
       "The Avengers                               26000.0  623279547.0   \n",
       "Captain America: Civil War                 21000.0  407197282.0   \n",
       "Guardians of the Galaxy                    14000.0  333130696.0   \n",
       "Interstellar                               11000.0  187991439.0   \n",
       "\n",
       "                                             genres         actor_1_name  \\\n",
       "movie_title                                                                \n",
       "The Dark Knight Rises               Action|Thriller            Tom Hardy   \n",
       "The Avengers                Action|Adventure|Sci-Fi      Chris Hemsworth   \n",
       "Captain America: Civil War  Action|Adventure|Sci-Fi    Robert Downey Jr.   \n",
       "Guardians of the Galaxy     Action|Adventure|Sci-Fi       Bradley Cooper   \n",
       "Interstellar                 Adventure|Drama|Sci-Fi  Matthew McConaughey   \n",
       "\n",
       "                            num_voted_users  cast_total_facebook_likes  \\\n",
       "movie_title                                                              \n",
       "The Dark Knight Rises               1144337                     106759   \n",
       "The Avengers                         995415                      87697   \n",
       "Captain America: Civil War           272670                      64798   \n",
       "Guardians of the Galaxy              682155                      32438   \n",
       "Interstellar                         928227                      31488   \n",
       "\n",
       "                                    actor_3_name  facenumber_in_poster  \\\n",
       "movie_title                                                              \n",
       "The Dark Knight Rises       Joseph Gordon-Levitt                   0.0   \n",
       "The Avengers                  Scarlett Johansson                   3.0   \n",
       "Captain America: Civil War           Chris Evans                   0.0   \n",
       "Guardians of the Galaxy           Djimon Hounsou                   3.0   \n",
       "Interstellar                       Mackenzie Foy                   1.0   \n",
       "\n",
       "                                                                plot_keywords  \\\n",
       "movie_title                                                                     \n",
       "The Dark Knight Rises       deception|imprisonment|lawlessness|police offi...   \n",
       "The Avengers                  alien invasion|assassin|battle|iron man|soldier   \n",
       "Captain America: Civil War  based on comic book|knife|marvel cinematic uni...   \n",
       "Guardians of the Galaxy     bounty hunter|outer space|raccoon|talking anim...   \n",
       "Interstellar                black hole|father daughter relationship|saving...   \n",
       "\n",
       "                                                              movie_imdb_link  \\\n",
       "movie_title                                                                     \n",
       "The Dark Knight Rises       http://www.imdb.com/title/tt1345836/?ref_=fn_t...   \n",
       "The Avengers                http://www.imdb.com/title/tt0848228/?ref_=fn_t...   \n",
       "Captain America: Civil War  http://www.imdb.com/title/tt3498820/?ref_=fn_t...   \n",
       "Guardians of the Galaxy     http://www.imdb.com/title/tt2015381/?ref_=fn_t...   \n",
       "Interstellar                http://www.imdb.com/title/tt0816692/?ref_=fn_t...   \n",
       "\n",
       "                            num_user_for_reviews language country  \\\n",
       "movie_title                                                         \n",
       "The Dark Knight Rises                     2701.0  English     USA   \n",
       "The Avengers                              1722.0  English     USA   \n",
       "Captain America: Civil War                1022.0  English     USA   \n",
       "Guardians of the Galaxy                   1097.0  English     USA   \n",
       "Interstellar                              2725.0  English     USA   \n",
       "\n",
       "                           content_rating       budget  title_year  \\\n",
       "movie_title                                                          \n",
       "The Dark Knight Rises               PG-13  250000000.0      2012.0   \n",
       "The Avengers                        PG-13  220000000.0      2012.0   \n",
       "Captain America: Civil War          PG-13  250000000.0      2016.0   \n",
       "Guardians of the Galaxy             PG-13  170000000.0      2014.0   \n",
       "Interstellar                        PG-13  165000000.0      2014.0   \n",
       "\n",
       "                            actor_2_facebook_likes  imdb_score  aspect_ratio  \\\n",
       "movie_title                                                                    \n",
       "The Dark Knight Rises                      23000.0         8.5          2.35   \n",
       "The Avengers                               21000.0         8.1          1.85   \n",
       "Captain America: Civil War                 19000.0         8.2          2.35   \n",
       "Guardians of the Galaxy                    14000.0         8.1          2.35   \n",
       "Interstellar                               11000.0         8.6          2.35   \n",
       "\n",
       "                            movie_facebook_likes  \n",
       "movie_title                                       \n",
       "The Dark Knight Rises                     164000  \n",
       "The Avengers                              123000  \n",
       "Captain America: Civil War                 72000  \n",
       "Guardians of the Galaxy                    96000  \n",
       "Interstellar                              349000  "
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie[final_crit_all].head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:31:51.616414Z",
     "start_time": "2019-10-31T06:31:51.598462Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>imdb_score</th>\n",
       "      <th>content_rating</th>\n",
       "      <th>title_year</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>movie_title</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>The Dark Knight Rises</th>\n",
       "      <td>8.5</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>2012.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>The Avengers</th>\n",
       "      <td>8.1</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>2012.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Captain America: Civil War</th>\n",
       "      <td>8.2</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>2016.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Guardians of the Galaxy</th>\n",
       "      <td>8.1</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>2014.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Interstellar</th>\n",
       "      <td>8.6</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>2014.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Inception</th>\n",
       "      <td>8.8</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>2010.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>The Martian</th>\n",
       "      <td>8.1</td>\n",
       "      <td>PG-13</td>\n",
       "      <td>2015.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Town &amp; Country</th>\n",
       "      <td>4.4</td>\n",
       "      <td>R</td>\n",
       "      <td>2001.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Sex and the City 2</th>\n",
       "      <td>4.3</td>\n",
       "      <td>R</td>\n",
       "      <td>2010.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Rollerball</th>\n",
       "      <td>3.0</td>\n",
       "      <td>R</td>\n",
       "      <td>2002.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                            imdb_score content_rating  title_year\n",
       "movie_title                                                      \n",
       "The Dark Knight Rises              8.5          PG-13      2012.0\n",
       "The Avengers                       8.1          PG-13      2012.0\n",
       "Captain America: Civil War         8.2          PG-13      2016.0\n",
       "Guardians of the Galaxy            8.1          PG-13      2014.0\n",
       "Interstellar                       8.6          PG-13      2014.0\n",
       "Inception                          8.8          PG-13      2010.0\n",
       "The Martian                        8.1          PG-13      2015.0\n",
       "Town & Country                     4.4              R      2001.0\n",
       "Sex and the City 2                 4.3              R      2010.0\n",
       "Rollerball                         3.0              R      2002.0"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cols = ['imdb_score', 'content_rating', 'title_year']\n",
    "movie_filtered = movie.loc[final_crit_all, cols]\n",
    "movie_filtered.head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 更多"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:36:30.299182Z",
     "start_time": "2019-10-31T06:36:30.286212Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final_crit_a2 = (movie.imdb_score > 8) & \\\n",
    "                (movie.content_rating == 'PG-13') & \\\n",
    "                ((movie.title_year < 2000) | (movie.title_year > 2009))\n",
    "final_crit_a2.equals(final_crit_a)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.用标签索引代替布尔索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:48:26.622566Z",
     "start_time": "2019-10-31T06:48:26.509841Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INSTNM</th>\n",
       "      <th>CITY</th>\n",
       "      <th>STABBR</th>\n",
       "      <th>HBCU</th>\n",
       "      <th>MENONLY</th>\n",
       "      <th>WOMENONLY</th>\n",
       "      <th>RELAFFIL</th>\n",
       "      <th>SATVRMID</th>\n",
       "      <th>SATMTMID</th>\n",
       "      <th>DISTANCEONLY</th>\n",
       "      <th>UGDS</th>\n",
       "      <th>UGDS_WHITE</th>\n",
       "      <th>UGDS_BLACK</th>\n",
       "      <th>UGDS_HISP</th>\n",
       "      <th>UGDS_ASIAN</th>\n",
       "      <th>UGDS_AIAN</th>\n",
       "      <th>UGDS_NHPI</th>\n",
       "      <th>UGDS_2MOR</th>\n",
       "      <th>UGDS_NRA</th>\n",
       "      <th>UGDS_UNKN</th>\n",
       "      <th>PPTUG_EF</th>\n",
       "      <th>CURROPER</th>\n",
       "      <th>PCTPELL</th>\n",
       "      <th>PCTFLOAN</th>\n",
       "      <th>UG25ABV</th>\n",
       "      <th>MD_EARN_WNE_P10</th>\n",
       "      <th>GRAD_DEBT_MDN_SUPP</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>3610</th>\n",
       "      <td>Abilene Christian University</td>\n",
       "      <td>Abilene</td>\n",
       "      <td>TX</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>530.0</td>\n",
       "      <td>545.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3572.0</td>\n",
       "      <td>0.6739</td>\n",
       "      <td>0.0798</td>\n",
       "      <td>0.1414</td>\n",
       "      <td>0.0090</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0454</td>\n",
       "      <td>0.0423</td>\n",
       "      <td>0.0045</td>\n",
       "      <td>0.0468</td>\n",
       "      <td>1</td>\n",
       "      <td>0.2595</td>\n",
       "      <td>0.5527</td>\n",
       "      <td>0.0381</td>\n",
       "      <td>40200</td>\n",
       "      <td>25985</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3611</th>\n",
       "      <td>Alvin Community College</td>\n",
       "      <td>Alvin</td>\n",
       "      <td>TX</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4682.0</td>\n",
       "      <td>0.5126</td>\n",
       "      <td>0.1034</td>\n",
       "      <td>0.3093</td>\n",
       "      <td>0.0500</td>\n",
       "      <td>0.0064</td>\n",
       "      <td>0.0038</td>\n",
       "      <td>0.0002</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0143</td>\n",
       "      <td>0.7123</td>\n",
       "      <td>1</td>\n",
       "      <td>0.1549</td>\n",
       "      <td>0.0625</td>\n",
       "      <td>0.2841</td>\n",
       "      <td>34500</td>\n",
       "      <td>6750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3612</th>\n",
       "      <td>Amarillo College</td>\n",
       "      <td>Amarillo</td>\n",
       "      <td>TX</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9346.0</td>\n",
       "      <td>0.5104</td>\n",
       "      <td>0.0507</td>\n",
       "      <td>0.3888</td>\n",
       "      <td>0.0293</td>\n",
       "      <td>0.0122</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0001</td>\n",
       "      <td>0.0085</td>\n",
       "      <td>0.6922</td>\n",
       "      <td>1</td>\n",
       "      <td>0.3786</td>\n",
       "      <td>0.1573</td>\n",
       "      <td>0.3431</td>\n",
       "      <td>31700</td>\n",
       "      <td>10950</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3613</th>\n",
       "      <td>Angelina College</td>\n",
       "      <td>Lufkin</td>\n",
       "      <td>TX</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3825.0</td>\n",
       "      <td>0.5854</td>\n",
       "      <td>0.1508</td>\n",
       "      <td>0.2207</td>\n",
       "      <td>0.0076</td>\n",
       "      <td>0.0073</td>\n",
       "      <td>0.0013</td>\n",
       "      <td>0.0264</td>\n",
       "      <td>0.0005</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.5600</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5308</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.2603</td>\n",
       "      <td>26900</td>\n",
       "      <td>PrivacySuppressed</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3614</th>\n",
       "      <td>Angelo State University</td>\n",
       "      <td>San Angelo</td>\n",
       "      <td>TX</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>475.0</td>\n",
       "      <td>490.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5290.0</td>\n",
       "      <td>0.5225</td>\n",
       "      <td>0.0841</td>\n",
       "      <td>0.3166</td>\n",
       "      <td>0.0087</td>\n",
       "      <td>0.0036</td>\n",
       "      <td>0.0017</td>\n",
       "      <td>0.0285</td>\n",
       "      <td>0.0331</td>\n",
       "      <td>0.0011</td>\n",
       "      <td>0.1289</td>\n",
       "      <td>1</td>\n",
       "      <td>0.4068</td>\n",
       "      <td>0.5279</td>\n",
       "      <td>0.1407</td>\n",
       "      <td>37700</td>\n",
       "      <td>21319.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                            INSTNM        CITY STABBR  HBCU  MENONLY  \\\n",
       "3610  Abilene Christian University     Abilene     TX   0.0      0.0   \n",
       "3611       Alvin Community College       Alvin     TX   0.0      0.0   \n",
       "3612              Amarillo College    Amarillo     TX   0.0      0.0   \n",
       "3613              Angelina College      Lufkin     TX   0.0      0.0   \n",
       "3614       Angelo State University  San Angelo     TX   0.0      0.0   \n",
       "\n",
       "      WOMENONLY  RELAFFIL  SATVRMID  SATMTMID  DISTANCEONLY    UGDS  \\\n",
       "3610        0.0         1     530.0     545.0           0.0  3572.0   \n",
       "3611        0.0         0       NaN       NaN           0.0  4682.0   \n",
       "3612        0.0         0       NaN       NaN           0.0  9346.0   \n",
       "3613        0.0         0       NaN       NaN           0.0  3825.0   \n",
       "3614        0.0         0     475.0     490.0           0.0  5290.0   \n",
       "\n",
       "      UGDS_WHITE  UGDS_BLACK  UGDS_HISP  UGDS_ASIAN  UGDS_AIAN  UGDS_NHPI  \\\n",
       "3610      0.6739      0.0798     0.1414      0.0090     0.0039     0.0000   \n",
       "3611      0.5126      0.1034     0.3093      0.0500     0.0064     0.0038   \n",
       "3612      0.5104      0.0507     0.3888      0.0293     0.0122     0.0000   \n",
       "3613      0.5854      0.1508     0.2207      0.0076     0.0073     0.0013   \n",
       "3614      0.5225      0.0841     0.3166      0.0087     0.0036     0.0017   \n",
       "\n",
       "      UGDS_2MOR  UGDS_NRA  UGDS_UNKN  PPTUG_EF  CURROPER  PCTPELL  PCTFLOAN  \\\n",
       "3610     0.0454    0.0423     0.0045    0.0468         1   0.2595    0.5527   \n",
       "3611     0.0002    0.0000     0.0143    0.7123         1   0.1549    0.0625   \n",
       "3612     0.0000    0.0001     0.0085    0.6922         1   0.3786    0.1573   \n",
       "3613     0.0264    0.0005     0.0000    0.5600         1   0.5308    0.0000   \n",
       "3614     0.0285    0.0331     0.0011    0.1289         1   0.4068    0.5279   \n",
       "\n",
       "      UG25ABV MD_EARN_WNE_P10 GRAD_DEBT_MDN_SUPP  \n",
       "3610   0.0381           40200              25985  \n",
       "3611   0.2841           34500               6750  \n",
       "3612   0.3431           31700              10950  \n",
       "3613   0.2603           26900  PrivacySuppressed  \n",
       "3614   0.1407           37700            21319.5  "
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "college = pd.read_csv('data/college.csv')\n",
    "college[college['STABBR'] == 'TX'].head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:49:23.317906Z",
     "start_time": "2019-10-31T06:49:23.273029Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INSTNM</th>\n",
       "      <th>CITY</th>\n",
       "      <th>HBCU</th>\n",
       "      <th>MENONLY</th>\n",
       "      <th>WOMENONLY</th>\n",
       "      <th>RELAFFIL</th>\n",
       "      <th>SATVRMID</th>\n",
       "      <th>SATMTMID</th>\n",
       "      <th>DISTANCEONLY</th>\n",
       "      <th>UGDS</th>\n",
       "      <th>UGDS_WHITE</th>\n",
       "      <th>UGDS_BLACK</th>\n",
       "      <th>UGDS_HISP</th>\n",
       "      <th>UGDS_ASIAN</th>\n",
       "      <th>UGDS_AIAN</th>\n",
       "      <th>UGDS_NHPI</th>\n",
       "      <th>UGDS_2MOR</th>\n",
       "      <th>UGDS_NRA</th>\n",
       "      <th>UGDS_UNKN</th>\n",
       "      <th>PPTUG_EF</th>\n",
       "      <th>CURROPER</th>\n",
       "      <th>PCTPELL</th>\n",
       "      <th>PCTFLOAN</th>\n",
       "      <th>UG25ABV</th>\n",
       "      <th>MD_EARN_WNE_P10</th>\n",
       "      <th>GRAD_DEBT_MDN_SUPP</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>STABBR</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Abilene Christian University</td>\n",
       "      <td>Abilene</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>530.0</td>\n",
       "      <td>545.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3572.0</td>\n",
       "      <td>0.6739</td>\n",
       "      <td>0.0798</td>\n",
       "      <td>0.1414</td>\n",
       "      <td>0.0090</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0454</td>\n",
       "      <td>0.0423</td>\n",
       "      <td>0.0045</td>\n",
       "      <td>0.0468</td>\n",
       "      <td>1</td>\n",
       "      <td>0.2595</td>\n",
       "      <td>0.5527</td>\n",
       "      <td>0.0381</td>\n",
       "      <td>40200</td>\n",
       "      <td>25985</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Alvin Community College</td>\n",
       "      <td>Alvin</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4682.0</td>\n",
       "      <td>0.5126</td>\n",
       "      <td>0.1034</td>\n",
       "      <td>0.3093</td>\n",
       "      <td>0.0500</td>\n",
       "      <td>0.0064</td>\n",
       "      <td>0.0038</td>\n",
       "      <td>0.0002</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0143</td>\n",
       "      <td>0.7123</td>\n",
       "      <td>1</td>\n",
       "      <td>0.1549</td>\n",
       "      <td>0.0625</td>\n",
       "      <td>0.2841</td>\n",
       "      <td>34500</td>\n",
       "      <td>6750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Amarillo College</td>\n",
       "      <td>Amarillo</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9346.0</td>\n",
       "      <td>0.5104</td>\n",
       "      <td>0.0507</td>\n",
       "      <td>0.3888</td>\n",
       "      <td>0.0293</td>\n",
       "      <td>0.0122</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0001</td>\n",
       "      <td>0.0085</td>\n",
       "      <td>0.6922</td>\n",
       "      <td>1</td>\n",
       "      <td>0.3786</td>\n",
       "      <td>0.1573</td>\n",
       "      <td>0.3431</td>\n",
       "      <td>31700</td>\n",
       "      <td>10950</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Angelina College</td>\n",
       "      <td>Lufkin</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3825.0</td>\n",
       "      <td>0.5854</td>\n",
       "      <td>0.1508</td>\n",
       "      <td>0.2207</td>\n",
       "      <td>0.0076</td>\n",
       "      <td>0.0073</td>\n",
       "      <td>0.0013</td>\n",
       "      <td>0.0264</td>\n",
       "      <td>0.0005</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.5600</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5308</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.2603</td>\n",
       "      <td>26900</td>\n",
       "      <td>PrivacySuppressed</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Angelo State University</td>\n",
       "      <td>San Angelo</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>475.0</td>\n",
       "      <td>490.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5290.0</td>\n",
       "      <td>0.5225</td>\n",
       "      <td>0.0841</td>\n",
       "      <td>0.3166</td>\n",
       "      <td>0.0087</td>\n",
       "      <td>0.0036</td>\n",
       "      <td>0.0017</td>\n",
       "      <td>0.0285</td>\n",
       "      <td>0.0331</td>\n",
       "      <td>0.0011</td>\n",
       "      <td>0.1289</td>\n",
       "      <td>1</td>\n",
       "      <td>0.4068</td>\n",
       "      <td>0.5279</td>\n",
       "      <td>0.1407</td>\n",
       "      <td>37700</td>\n",
       "      <td>21319.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                              INSTNM        CITY  HBCU  MENONLY  WOMENONLY  \\\n",
       "STABBR                                                                       \n",
       "TX      Abilene Christian University     Abilene   0.0      0.0        0.0   \n",
       "TX           Alvin Community College       Alvin   0.0      0.0        0.0   \n",
       "TX                  Amarillo College    Amarillo   0.0      0.0        0.0   \n",
       "TX                  Angelina College      Lufkin   0.0      0.0        0.0   \n",
       "TX           Angelo State University  San Angelo   0.0      0.0        0.0   \n",
       "\n",
       "        RELAFFIL  SATVRMID  SATMTMID  DISTANCEONLY    UGDS  UGDS_WHITE  \\\n",
       "STABBR                                                                   \n",
       "TX             1     530.0     545.0           0.0  3572.0      0.6739   \n",
       "TX             0       NaN       NaN           0.0  4682.0      0.5126   \n",
       "TX             0       NaN       NaN           0.0  9346.0      0.5104   \n",
       "TX             0       NaN       NaN           0.0  3825.0      0.5854   \n",
       "TX             0     475.0     490.0           0.0  5290.0      0.5225   \n",
       "\n",
       "        UGDS_BLACK  UGDS_HISP  UGDS_ASIAN  UGDS_AIAN  UGDS_NHPI  UGDS_2MOR  \\\n",
       "STABBR                                                                       \n",
       "TX          0.0798     0.1414      0.0090     0.0039     0.0000     0.0454   \n",
       "TX          0.1034     0.3093      0.0500     0.0064     0.0038     0.0002   \n",
       "TX          0.0507     0.3888      0.0293     0.0122     0.0000     0.0000   \n",
       "TX          0.1508     0.2207      0.0076     0.0073     0.0013     0.0264   \n",
       "TX          0.0841     0.3166      0.0087     0.0036     0.0017     0.0285   \n",
       "\n",
       "        UGDS_NRA  UGDS_UNKN  PPTUG_EF  CURROPER  PCTPELL  PCTFLOAN  UG25ABV  \\\n",
       "STABBR                                                                        \n",
       "TX        0.0423     0.0045    0.0468         1   0.2595    0.5527   0.0381   \n",
       "TX        0.0000     0.0143    0.7123         1   0.1549    0.0625   0.2841   \n",
       "TX        0.0001     0.0085    0.6922         1   0.3786    0.1573   0.3431   \n",
       "TX        0.0005     0.0000    0.5600         1   0.5308    0.0000   0.2603   \n",
       "TX        0.0331     0.0011    0.1289         1   0.4068    0.5279   0.1407   \n",
       "\n",
       "       MD_EARN_WNE_P10 GRAD_DEBT_MDN_SUPP  \n",
       "STABBR                                     \n",
       "TX               40200              25985  \n",
       "TX               34500               6750  \n",
       "TX               31700              10950  \n",
       "TX               26900  PrivacySuppressed  \n",
       "TX               37700            21319.5  "
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "college2 = college.set_index('STABBR')\n",
    "college2.loc['TX'].head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:52:44.062154Z",
     "start_time": "2019-10-31T06:52:42.622003Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.68 ms ± 67.9 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit college[college['STABBR'] == 'TX']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:52:53.632170Z",
     "start_time": "2019-10-31T06:52:46.365603Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "882 µs ± 58.4 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit college2.loc['TX']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:52:39.584439Z",
     "start_time": "2019-10-31T06:52:37.038215Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2.94 ms ± 105 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit college2 = college.set_index('STABBR')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 更多"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-10-31T06:56:17.418434Z",
     "start_time": "2019-10-31T06:56:17.357596Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INSTNM</th>\n",
       "      <th>CITY</th>\n",
       "      <th>HBCU</th>\n",
       "      <th>MENONLY</th>\n",
       "      <th>WOMENONLY</th>\n",
       "      <th>RELAFFIL</th>\n",
       "      <th>SATVRMID</th>\n",
       "      <th>SATMTMID</th>\n",
       "      <th>DISTANCEONLY</th>\n",
       "      <th>UGDS</th>\n",
       "      <th>UGDS_WHITE</th>\n",
       "      <th>UGDS_BLACK</th>\n",
       "      <th>UGDS_HISP</th>\n",
       "      <th>UGDS_ASIAN</th>\n",
       "      <th>UGDS_AIAN</th>\n",
       "      <th>UGDS_NHPI</th>\n",
       "      <th>UGDS_2MOR</th>\n",
       "      <th>UGDS_NRA</th>\n",
       "      <th>UGDS_UNKN</th>\n",
       "      <th>PPTUG_EF</th>\n",
       "      <th>CURROPER</th>\n",
       "      <th>PCTPELL</th>\n",
       "      <th>PCTFLOAN</th>\n",
       "      <th>UG25ABV</th>\n",
       "      <th>MD_EARN_WNE_P10</th>\n",
       "      <th>GRAD_DEBT_MDN_SUPP</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>STABBR</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Abilene Christian University</td>\n",
       "      <td>Abilene</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>530.0</td>\n",
       "      <td>545.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3572.0</td>\n",
       "      <td>0.6739</td>\n",
       "      <td>0.0798</td>\n",
       "      <td>0.1414</td>\n",
       "      <td>0.0090</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0454</td>\n",
       "      <td>0.0423</td>\n",
       "      <td>0.0045</td>\n",
       "      <td>0.0468</td>\n",
       "      <td>1</td>\n",
       "      <td>0.2595</td>\n",
       "      <td>0.5527</td>\n",
       "      <td>0.0381</td>\n",
       "      <td>40200</td>\n",
       "      <td>25985</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Alvin Community College</td>\n",
       "      <td>Alvin</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4682.0</td>\n",
       "      <td>0.5126</td>\n",
       "      <td>0.1034</td>\n",
       "      <td>0.3093</td>\n",
       "      <td>0.0500</td>\n",
       "      <td>0.0064</td>\n",
       "      <td>0.0038</td>\n",
       "      <td>0.0002</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0143</td>\n",
       "      <td>0.7123</td>\n",
       "      <td>1</td>\n",
       "      <td>0.1549</td>\n",
       "      <td>0.0625</td>\n",
       "      <td>0.2841</td>\n",
       "      <td>34500</td>\n",
       "      <td>6750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Amarillo College</td>\n",
       "      <td>Amarillo</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9346.0</td>\n",
       "      <td>0.5104</td>\n",
       "      <td>0.0507</td>\n",
       "      <td>0.3888</td>\n",
       "      <td>0.0293</td>\n",
       "      <td>0.0122</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0001</td>\n",
       "      <td>0.0085</td>\n",
       "      <td>0.6922</td>\n",
       "      <td>1</td>\n",
       "      <td>0.3786</td>\n",
       "      <td>0.1573</td>\n",
       "      <td>0.3431</td>\n",
       "      <td>31700</td>\n",
       "      <td>10950</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Angelina College</td>\n",
       "      <td>Lufkin</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3825.0</td>\n",
       "      <td>0.5854</td>\n",
       "      <td>0.1508</td>\n",
       "      <td>0.2207</td>\n",
       "      <td>0.0076</td>\n",
       "      <td>0.0073</td>\n",
       "      <td>0.0013</td>\n",
       "      <td>0.0264</td>\n",
       "      <td>0.0005</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.5600</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5308</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.2603</td>\n",
       "      <td>26900</td>\n",
       "      <td>PrivacySuppressed</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TX</th>\n",
       "      <td>Angelo State University</td>\n",
       "      <td>San Angelo</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>475.0</td>\n",
       "      <td>490.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5290.0</td>\n",
       "      <td>0.5225</td>\n",
       "      <td>0.0841</td>\n",
       "      <td>0.3166</td>\n",
       "      <td>0.0087</td>\n",
       "      <td>0.0036</td>\n",
       "      <td>0.0017</td>\n",
       "      <td>0.0285</td>\n",
       "      <td>0.0331</td>\n",
       "      <td>0.0011</td>\n",
       "      <td>0.1289</td>\n",
       "      <td>1</td>\n",
       "      <td>0.4068</td>\n",
       "      <td>0.5279</td>\n",
       "      <td>0.1407</td>\n",
       "      <td>37700</td>\n",
       "      <td>21319.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                              INSTNM        CITY  HBCU  MENONLY  WOMENONLY  \\\n",
       "STABBR                                                                       \n",
       "TX      Abilene Christian University     Abilene   0.0      0.0        0.0   \n",
       "TX           Alvin Community College       Alvin   0.0      0.0        0.0   \n",
       "TX                  Amarillo College    Amarillo   0.0      0.0        0.0   \n",
       "TX                  Angelina College      Lufkin   0.0      0.0        0.0   \n",
       "TX           Angelo State University  San Angelo   0.0      0.0        0.0   \n",
       "\n",
       "        RELAFFIL  SATVRMID  SATMTMID  DISTANCEONLY    UGDS  UGDS_WHITE  \\\n",
       "STABBR                                                                   \n",
       "TX             1     530.0     545.0           0.0  3572.0      0.6739   \n",
       "TX             0       NaN       NaN           0.0  4682.0      0.5126   \n",
       "TX             0       NaN       NaN           0.0  9346.0      0.5104   \n",
       "TX             0       NaN       NaN           0.0  3825.0      0.5854   \n",
       "TX             0     475.0     490.0           0.0  5290.0      0.5225   \n",
       "\n",
       "        UGDS_BLACK  UGDS_HISP  UGDS_ASIAN  UGDS_AIAN  UGDS_NHPI  UGDS_2MOR  \\\n",
       "STABBR                                                                       \n",
       "TX          0.0798     0.1414      0.0090     0.0039     0.0000     0.0454   \n",
       "TX          0.1034     0.3093      0.0500     0.0064     0.0038     0.0002   \n",
       "TX          0.0507     0.3888      0.0293     0.0122     0.0000     0.0000   \n",
       "TX          0.1508     0.2207      0.0076     0.0073     0.0013     0.0264   \n",
       "TX          0.0841     0.3166      0.0087     0.0036     0.0017     0.0285   \n",
       "\n",
       "        UGDS_NRA  UGDS_UNKN  PPTUG_EF  CURROPER  PCTPELL  PCTFLOAN  UG25ABV  \\\n",
       "STABBR                                                                        \n",
       "TX        0.0423     0.0045    0.0468         1   0.2595    0.5527   0.0381   \n",
       "TX        0.0000     0.0143    0.7123         1   0.1549    0.0625   0.2841   \n",
       "TX        0.0001     0.0085    0.6922         1   0.3786    0.1573   0.3431   \n",
       "TX        0.0005     0.0000    0.5600         1   0.5308    0.0000   0.2603   \n",
       "TX        0.0331     0.0011    0.1289         1   0.4068    0.5279   0.1407   \n",
       "\n",
       "       MD_EARN_WNE_P10 GRAD_DEBT_MDN_SUPP  \n",
       "STABBR                                     \n",
       "TX               40200              25985  \n",
       "TX               34500               6750  \n",
       "TX               31700              10950  \n",
       "TX               26900  PrivacySuppressed  \n",
       "TX               37700            21319.5  "
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "states = ['TX', 'CA', 'NY']\n",
    "college[college['STABBR'].isin(states)]\n",
    "college2.loc[states].head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5.用唯一和有序索引选取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:07:13.933642Z",
     "start_time": "2019-11-06T08:07:13.831913Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "college = pd.read_csv('data/college.csv')\n",
    "college2 = college.set_index('STABBR')\n",
    "college2.index.is_monotonic"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:07:17.257755Z",
     "start_time": "2019-11-06T08:07:17.239803Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "college3 = college2.sort_index()\n",
    "college3.index.is_monotonic"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:07:22.120751Z",
     "start_time": "2019-11-06T08:07:20.544004Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.89 ms ± 140 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit college[college['STABBR'] == 'TX']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:08:49.246861Z",
     "start_time": "2019-11-06T08:08:40.944007Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.02 ms ± 197 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit college2.loc['TX']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:10:33.689170Z",
     "start_time": "2019-11-06T08:10:31.256642Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "293 µs ± 6.44 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit college3.loc['TX']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:11:36.829323Z",
     "start_time": "2019-11-06T08:11:36.816360Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用INSTNM作为行索引，检测行索引是否唯一\n",
    "college_unique = college.set_index('INSTNM')\n",
    "college_unique.index.is_unique"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:12:49.946836Z",
     "start_time": "2019-11-06T08:12:49.889022Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INSTNM</th>\n",
       "      <th>CITY</th>\n",
       "      <th>STABBR</th>\n",
       "      <th>HBCU</th>\n",
       "      <th>MENONLY</th>\n",
       "      <th>WOMENONLY</th>\n",
       "      <th>RELAFFIL</th>\n",
       "      <th>SATVRMID</th>\n",
       "      <th>SATMTMID</th>\n",
       "      <th>DISTANCEONLY</th>\n",
       "      <th>...</th>\n",
       "      <th>UGDS_2MOR</th>\n",
       "      <th>UGDS_NRA</th>\n",
       "      <th>UGDS_UNKN</th>\n",
       "      <th>PPTUG_EF</th>\n",
       "      <th>CURROPER</th>\n",
       "      <th>PCTPELL</th>\n",
       "      <th>PCTFLOAN</th>\n",
       "      <th>UG25ABV</th>\n",
       "      <th>MD_EARN_WNE_P10</th>\n",
       "      <th>GRAD_DEBT_MDN_SUPP</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>4217</th>\n",
       "      <td>Stanford University</td>\n",
       "      <td>Stanford</td>\n",
       "      <td>CA</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>730.0</td>\n",
       "      <td>745.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1067</td>\n",
       "      <td>0.0819</td>\n",
       "      <td>0.0031</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.1556</td>\n",
       "      <td>0.1256</td>\n",
       "      <td>0.0401</td>\n",
       "      <td>86000</td>\n",
       "      <td>12782</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                   INSTNM      CITY STABBR  HBCU  MENONLY  WOMENONLY  \\\n",
       "4217  Stanford University  Stanford     CA   0.0      0.0        0.0   \n",
       "\n",
       "      RELAFFIL  SATVRMID  SATMTMID  DISTANCEONLY  ...  UGDS_2MOR  UGDS_NRA  \\\n",
       "4217         0     730.0     745.0           0.0  ...     0.1067    0.0819   \n",
       "\n",
       "      UGDS_UNKN  PPTUG_EF  CURROPER  PCTPELL  PCTFLOAN  UG25ABV  \\\n",
       "4217     0.0031       0.0         1   0.1556    0.1256   0.0401   \n",
       "\n",
       "      MD_EARN_WNE_P10  GRAD_DEBT_MDN_SUPP  \n",
       "4217            86000               12782  \n",
       "\n",
       "[1 rows x 27 columns]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 用布尔索引选取斯坦福大学\n",
    "college[college['INSTNM']== 'Stanford University']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:13:51.655847Z",
     "start_time": "2019-11-06T08:13:51.647877Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "CITY                  Stanford\n",
       "STABBR                      CA\n",
       "HBCU                         0\n",
       "MENONLY                      0\n",
       "WOMENONLY                    0\n",
       "RELAFFIL                     0\n",
       "SATVRMID                   730\n",
       "SATMTMID                   745\n",
       "DISTANCEONLY                 0\n",
       "UGDS                      7018\n",
       "UGDS_WHITE              0.3752\n",
       "UGDS_BLACK              0.0591\n",
       "UGDS_HISP               0.1607\n",
       "UGDS_ASIAN              0.1979\n",
       "UGDS_AIAN               0.0114\n",
       "UGDS_NHPI               0.0038\n",
       "UGDS_2MOR               0.1067\n",
       "UGDS_NRA                0.0819\n",
       "UGDS_UNKN               0.0031\n",
       "PPTUG_EF                     0\n",
       "CURROPER                     1\n",
       "PCTPELL                 0.1556\n",
       "PCTFLOAN                0.1256\n",
       "UG25ABV                 0.0401\n",
       "MD_EARN_WNE_P10          86000\n",
       "GRAD_DEBT_MDN_SUPP       12782\n",
       "Name: Stanford University, dtype: object"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 用行索引标签选取斯坦福大学\n",
    "college_unique.loc['Stanford University']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:16:08.372318Z",
     "start_time": "2019-11-06T08:15:55.304258Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.6 ms ± 65.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "# 比较两种方法的速度\n",
    "%timeit college[college['INSTNM'] == 'Stanford University']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:16:10.817781Z",
     "start_time": "2019-11-06T08:16:08.585748Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "269 µs ± 17.5 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit college_unique.loc['Stanford University']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 更多"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:19:24.739337Z",
     "start_time": "2019-11-06T08:19:24.568766Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INSTNM</th>\n",
       "      <th>CITY</th>\n",
       "      <th>STABBR</th>\n",
       "      <th>HBCU</th>\n",
       "      <th>MENONLY</th>\n",
       "      <th>WOMENONLY</th>\n",
       "      <th>RELAFFIL</th>\n",
       "      <th>SATVRMID</th>\n",
       "      <th>SATMTMID</th>\n",
       "      <th>DISTANCEONLY</th>\n",
       "      <th>...</th>\n",
       "      <th>UGDS_2MOR</th>\n",
       "      <th>UGDS_NRA</th>\n",
       "      <th>UGDS_UNKN</th>\n",
       "      <th>PPTUG_EF</th>\n",
       "      <th>CURROPER</th>\n",
       "      <th>PCTPELL</th>\n",
       "      <th>PCTFLOAN</th>\n",
       "      <th>UG25ABV</th>\n",
       "      <th>MD_EARN_WNE_P10</th>\n",
       "      <th>GRAD_DEBT_MDN_SUPP</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>ARTESIA, CA</th>\n",
       "      <td>Angeles Institute</td>\n",
       "      <td>ARTESIA</td>\n",
       "      <td>CA</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0175</td>\n",
       "      <td>0.0088</td>\n",
       "      <td>0.0088</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>1</td>\n",
       "      <td>0.6275</td>\n",
       "      <td>0.8138</td>\n",
       "      <td>0.5429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>16850</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Aberdeen, SD</th>\n",
       "      <td>Presentation College</td>\n",
       "      <td>Aberdeen</td>\n",
       "      <td>SD</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>440.0</td>\n",
       "      <td>480.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0284</td>\n",
       "      <td>0.0142</td>\n",
       "      <td>0.0823</td>\n",
       "      <td>0.2865</td>\n",
       "      <td>1</td>\n",
       "      <td>0.4829</td>\n",
       "      <td>0.7560</td>\n",
       "      <td>0.3097</td>\n",
       "      <td>35900</td>\n",
       "      <td>25000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Aberdeen, SD</th>\n",
       "      <td>Northern State University</td>\n",
       "      <td>Aberdeen</td>\n",
       "      <td>SD</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>480.0</td>\n",
       "      <td>475.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0219</td>\n",
       "      <td>0.0425</td>\n",
       "      <td>0.0024</td>\n",
       "      <td>0.1872</td>\n",
       "      <td>1</td>\n",
       "      <td>0.2272</td>\n",
       "      <td>0.4303</td>\n",
       "      <td>0.1766</td>\n",
       "      <td>33600</td>\n",
       "      <td>24847</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Aberdeen, WA</th>\n",
       "      <td>Grays Harbor College</td>\n",
       "      <td>Aberdeen</td>\n",
       "      <td>WA</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0937</td>\n",
       "      <td>0.0009</td>\n",
       "      <td>0.0250</td>\n",
       "      <td>0.1820</td>\n",
       "      <td>1</td>\n",
       "      <td>0.4530</td>\n",
       "      <td>0.1502</td>\n",
       "      <td>0.5087</td>\n",
       "      <td>27000</td>\n",
       "      <td>11490</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Abilene, TX</th>\n",
       "      <td>Hardin-Simmons University</td>\n",
       "      <td>Abilene</td>\n",
       "      <td>TX</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>508.0</td>\n",
       "      <td>515.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0298</td>\n",
       "      <td>0.0159</td>\n",
       "      <td>0.0102</td>\n",
       "      <td>0.0685</td>\n",
       "      <td>1</td>\n",
       "      <td>0.3256</td>\n",
       "      <td>0.5547</td>\n",
       "      <td>0.0982</td>\n",
       "      <td>38700</td>\n",
       "      <td>25864</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                 INSTNM      CITY STABBR  HBCU  MENONLY  \\\n",
       "ARTESIA, CA           Angeles Institute   ARTESIA     CA   0.0      0.0   \n",
       "Aberdeen, SD       Presentation College  Aberdeen     SD   0.0      0.0   \n",
       "Aberdeen, SD  Northern State University  Aberdeen     SD   0.0      0.0   \n",
       "Aberdeen, WA       Grays Harbor College  Aberdeen     WA   0.0      0.0   \n",
       "Abilene, TX   Hardin-Simmons University   Abilene     TX   0.0      0.0   \n",
       "\n",
       "              WOMENONLY  RELAFFIL  SATVRMID  SATMTMID  DISTANCEONLY  ...  \\\n",
       "ARTESIA, CA         0.0         0       NaN       NaN           0.0  ...   \n",
       "Aberdeen, SD        0.0         1     440.0     480.0           0.0  ...   \n",
       "Aberdeen, SD        0.0         0     480.0     475.0           0.0  ...   \n",
       "Aberdeen, WA        0.0         0       NaN       NaN           0.0  ...   \n",
       "Abilene, TX         0.0         1     508.0     515.0           0.0  ...   \n",
       "\n",
       "              UGDS_2MOR  UGDS_NRA  UGDS_UNKN  PPTUG_EF  CURROPER  PCTPELL  \\\n",
       "ARTESIA, CA      0.0175    0.0088     0.0088    0.0000         1   0.6275   \n",
       "Aberdeen, SD     0.0284    0.0142     0.0823    0.2865         1   0.4829   \n",
       "Aberdeen, SD     0.0219    0.0425     0.0024    0.1872         1   0.2272   \n",
       "Aberdeen, WA     0.0937    0.0009     0.0250    0.1820         1   0.4530   \n",
       "Abilene, TX      0.0298    0.0159     0.0102    0.0685         1   0.3256   \n",
       "\n",
       "              PCTFLOAN  UG25ABV  MD_EARN_WNE_P10  GRAD_DEBT_MDN_SUPP  \n",
       "ARTESIA, CA     0.8138   0.5429              NaN               16850  \n",
       "Aberdeen, SD    0.7560   0.3097            35900               25000  \n",
       "Aberdeen, SD    0.4303   0.1766            33600               24847  \n",
       "Aberdeen, WA    0.1502   0.5087            27000               11490  \n",
       "Abilene, TX     0.5547   0.0982            38700               25864  \n",
       "\n",
       "[5 rows x 27 columns]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用CITY和STABBR两列作为行索引，并进行排序\n",
    "college.index = college['CITY'] + ', ' + college['STABBR']\n",
    "college = college.sort_index()\n",
    "college.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:20:22.277471Z",
     "start_time": "2019-11-06T08:20:22.233590Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>INSTNM</th>\n",
       "      <th>CITY</th>\n",
       "      <th>STABBR</th>\n",
       "      <th>HBCU</th>\n",
       "      <th>MENONLY</th>\n",
       "      <th>WOMENONLY</th>\n",
       "      <th>RELAFFIL</th>\n",
       "      <th>SATVRMID</th>\n",
       "      <th>SATMTMID</th>\n",
       "      <th>DISTANCEONLY</th>\n",
       "      <th>...</th>\n",
       "      <th>UGDS_2MOR</th>\n",
       "      <th>UGDS_NRA</th>\n",
       "      <th>UGDS_UNKN</th>\n",
       "      <th>PPTUG_EF</th>\n",
       "      <th>CURROPER</th>\n",
       "      <th>PCTPELL</th>\n",
       "      <th>PCTFLOAN</th>\n",
       "      <th>UG25ABV</th>\n",
       "      <th>MD_EARN_WNE_P10</th>\n",
       "      <th>GRAD_DEBT_MDN_SUPP</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Miami, FL</th>\n",
       "      <td>New Professions Technical Institute</td>\n",
       "      <td>Miami</td>\n",
       "      <td>FL</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.4464</td>\n",
       "      <td>1</td>\n",
       "      <td>0.8701</td>\n",
       "      <td>0.6780</td>\n",
       "      <td>0.8358</td>\n",
       "      <td>18700</td>\n",
       "      <td>8682</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Miami, FL</th>\n",
       "      <td>Management Resources College</td>\n",
       "      <td>Miami</td>\n",
       "      <td>FL</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>1</td>\n",
       "      <td>0.4239</td>\n",
       "      <td>0.5458</td>\n",
       "      <td>0.8698</td>\n",
       "      <td>PrivacySuppressed</td>\n",
       "      <td>12182</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Miami, FL</th>\n",
       "      <td>Strayer University-Doral</td>\n",
       "      <td>Miami</td>\n",
       "      <td>FL</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>49200</td>\n",
       "      <td>36173.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Miami, FL</th>\n",
       "      <td>Keiser University- Miami</td>\n",
       "      <td>Miami</td>\n",
       "      <td>FL</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29700</td>\n",
       "      <td>26063</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Miami, FL</th>\n",
       "      <td>George T Baker Aviation Technical College</td>\n",
       "      <td>Miami</td>\n",
       "      <td>FL</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0046</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.5686</td>\n",
       "      <td>1</td>\n",
       "      <td>0.2567</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.4366</td>\n",
       "      <td>38600</td>\n",
       "      <td>PrivacySuppressed</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                              INSTNM   CITY STABBR  HBCU  \\\n",
       "Miami, FL        New Professions Technical Institute  Miami     FL   0.0   \n",
       "Miami, FL               Management Resources College  Miami     FL   0.0   \n",
       "Miami, FL                   Strayer University-Doral  Miami     FL   NaN   \n",
       "Miami, FL                   Keiser University- Miami  Miami     FL   NaN   \n",
       "Miami, FL  George T Baker Aviation Technical College  Miami     FL   0.0   \n",
       "\n",
       "           MENONLY  WOMENONLY  RELAFFIL  SATVRMID  SATMTMID  DISTANCEONLY  \\\n",
       "Miami, FL      0.0        0.0         0       NaN       NaN           0.0   \n",
       "Miami, FL      0.0        0.0         0       NaN       NaN           0.0   \n",
       "Miami, FL      NaN        NaN         1       NaN       NaN           NaN   \n",
       "Miami, FL      NaN        NaN         1       NaN       NaN           NaN   \n",
       "Miami, FL      0.0        0.0         0       NaN       NaN           0.0   \n",
       "\n",
       "           ...  UGDS_2MOR  UGDS_NRA  UGDS_UNKN  PPTUG_EF  CURROPER  PCTPELL  \\\n",
       "Miami, FL  ...     0.0000       0.0        0.0    0.4464         1   0.8701   \n",
       "Miami, FL  ...     0.0000       0.0        0.0    0.0000         1   0.4239   \n",
       "Miami, FL  ...        NaN       NaN        NaN       NaN         1      NaN   \n",
       "Miami, FL  ...        NaN       NaN        NaN       NaN         1      NaN   \n",
       "Miami, FL  ...     0.0046       0.0        0.0    0.5686         1   0.2567   \n",
       "\n",
       "           PCTFLOAN  UG25ABV    MD_EARN_WNE_P10  GRAD_DEBT_MDN_SUPP  \n",
       "Miami, FL    0.6780   0.8358              18700                8682  \n",
       "Miami, FL    0.5458   0.8698  PrivacySuppressed               12182  \n",
       "Miami, FL       NaN      NaN              49200             36173.5  \n",
       "Miami, FL       NaN      NaN              29700               26063  \n",
       "Miami, FL    0.0000   0.4366              38600   PrivacySuppressed  \n",
       "\n",
       "[5 rows x 27 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 选取所有Miami, FL的大学\n",
    "college.loc['Miami, FL'].head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:30:53.320883Z",
     "start_time": "2019-11-06T08:30:43.436279Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.24 ms ± 213 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "# 速度比较\n",
    "crit1 = college['CITY'] == 'Miami'\n",
    "crit2 = college['STABBR'] == 'FL'\n",
    "%timeit college[crit1 & crit2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:30:56.211154Z",
     "start_time": "2019-11-06T08:30:53.554227Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "307 µs ± 28.4 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit college.loc['Miami, FL']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T08:33:15.639514Z",
     "start_time": "2019-11-06T08:33:15.624586Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 判断这两个条件是否相同\n",
    "college[(college['CITY'] == 'Miami') & (college['STABBR'] == 'FL')].equals(college.loc['Miami, FL'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6.观察股价"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T09:10:04.993831Z",
     "start_time": "2019-11-06T09:10:04.858195Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Open</th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2010-01-04</th>\n",
       "      <td>66.39</td>\n",
       "      <td>67.20</td>\n",
       "      <td>66.12</td>\n",
       "      <td>67.11</td>\n",
       "      <td>5771234</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010-01-05</th>\n",
       "      <td>66.99</td>\n",
       "      <td>67.62</td>\n",
       "      <td>66.73</td>\n",
       "      <td>67.30</td>\n",
       "      <td>7366270</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010-01-06</th>\n",
       "      <td>67.17</td>\n",
       "      <td>68.94</td>\n",
       "      <td>67.03</td>\n",
       "      <td>68.80</td>\n",
       "      <td>9949946</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010-01-07</th>\n",
       "      <td>68.49</td>\n",
       "      <td>69.81</td>\n",
       "      <td>68.21</td>\n",
       "      <td>69.51</td>\n",
       "      <td>7700297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010-01-08</th>\n",
       "      <td>69.19</td>\n",
       "      <td>72.00</td>\n",
       "      <td>69.09</td>\n",
       "      <td>70.65</td>\n",
       "      <td>13487621</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             Open   High    Low  Close    Volume\n",
       "Date                                            \n",
       "2010-01-04  66.39  67.20  66.12  67.11   5771234\n",
       "2010-01-05  66.99  67.62  66.73  67.30   7366270\n",
       "2010-01-06  67.17  68.94  67.03  68.80   9949946\n",
       "2010-01-07  68.49  69.81  68.21  69.51   7700297\n",
       "2010-01-08  69.19  72.00  69.09  70.65  13487621"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 读取Schlumberger stock数据集，行索引设为Date列，并将其转变为Datetime\n",
    "\n",
    "slb = pd.read_csv('data/slb_stock.csv', index_col='Date', parse_dates=['Date'])\n",
    "slb.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T09:12:23.062689Z",
     "start_time": "2019-11-06T09:12:23.047728Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count    1895.000000\n",
       "mean       79.121905\n",
       "std        11.767802\n",
       "min        51.750000\n",
       "10%        64.892000\n",
       "50%        78.000000\n",
       "90%        93.248000\n",
       "max       117.950000\n",
       "Name: Close, dtype: float64"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 选取Close这列，用describe返回统计信息\n",
    "slb_close = slb['Close']\n",
    "slb_summary = slb_close.describe(percentiles=[.1, .9])\n",
    "slb_summary"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T09:20:25.307823Z",
     "start_time": "2019-11-06T09:20:25.297848Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "93.24800000000002"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "slb_summary.loc['90%']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T09:24:04.054985Z",
     "start_time": "2019-11-06T09:24:04.042045Z"
    }
   },
   "outputs": [],
   "source": [
    "# 用布尔索引选取最高和最低10%的收盘价\n",
    "upper_10 = slb_summary.loc['90%']\n",
    "lower_10 = slb_summary.loc['10%']\n",
    "criteria = (slb_close < lower_10) | (slb_close > upper_10)\n",
    "slb_top_bottom_10 = slb_close[criteria]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-11-06T09:34:07.268576Z",
     "start_time": "2019-11-06T09:34:06.977356Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.LineCollection at 0x1a92b105f98>"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAskAAAFiCAYAAAAEBkVdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzs3Xl8U1X6P/DPadOkhZaCLTvYFiggiwiDIsyIC8I4MogoODoqKot+B386+lUGxXFwHccNxO2rICrjKIoLuw4qLsgwoAiIyFZKWyhtaYGydEua5vz+KOf23uRmaZu0SfN5v16+mtzc3pxie++T5z7nOUJKCSIiIiIiqhPT3AMgIiIiIgo3DJKJiIiIiNwwSCYiIiIicsMgmYiIiIjIDYNkIiIiIiI3DJKJiIiIiNwwSCYiIiIicsMgmYiIiIjIDYNkIiIiI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Rrt7qGvO3fBIIQwBEx9+/b12KdVq1baz6mCMQqe2267DRMmTNDuHuzbty/g6+Abb7wBIYTWhjXQILmhmWS1PPuCBQtw9tln4/rrr9eC++effx4ff/xxg47bHBgktwAqSFa34FQt0Pz58z1mxzdVkAzUnrjfeustn/tYLBaPpXeZSaaWqKamBl27dgUAQ/uvm2++Gbfccgv69euHadOmadv79u0b9G4F1HT0QbL+sXupwosvvmh47usuXEpKCmw2G0pKSjBu3Divxww1s0mCs2fPZpAcIvp/z1dffRVAbalNoHXJd955J4Da1fMA/11QGluTfMstt6B79+549NFHtW2q/OL+++/HxIkTG3Tc5sAguQVwn7AH1GYrZsyY4VF71JRBMgDceuutqKqqwjPPPINvv/0WP/zwg8c+7ouMsCaZWiKn04muXbt63MJUGRb3BQLMsnUUOQLJJEspPX4f9Kv1mWnTpo3HOTPU5Rbu9OUWixYtQmVlJTp37swgOYhqamq061xubq7pPoGWXKj/H6qO2VuQXFNTgwULFgTUacqfESNGGJ5Hao0yg+QWwGyixODBg01/wZs6SAZqy0BmzpyJkSNHYujQoR6vr1692tBb098fZkxMDINk8uq9997DgAEDwm7FJ1VuMXjwYMN2b7/LoWrpRU1DHxjrH6u7CUDtudvhcBjKJfzdCk9OTjYkPz744ANkZGQEY8gBi4uLw4MPPoiVK1diypQp2nVF1V4HI0hetGgR3nvvvUYfJ1JZLBZtbkJ2drbhNZVsCiRI1ne5UhM8vQXJn332Ge644w6trWBDa5IBeFzrCwoKGnys5sQguQUwC5L1v6BqYh9Q//7FTWHMmDG45557tOeBBMkstyBvbrrpJvzyyy8B9/RuKmo1SfdJT96CZGaSI5u3coukpCTMnz8fQO1t8Llz59brvJycnGzoRTxp0qQgjLb+/v73vxtKPoC6DwNmdzfra9q0abjxxhsbfZxI9u677wIwzmEAgF/96lcAgP/93//1u0T1I4884rHNLEg+duyY1kbwyy+/BNC4THK3bt0Mz5lJpmbjvgITAFxyySXaY31v48b80oeSPnvia+IeUJuR0386JtJTv+P6PrThwOl0wm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YiIiIjIgkEyEVEeEZGQiKwVkY0isk5EbhORdo/VIlIjIld01j4SEXUFDJKJiPLLEaXUeKXU8QDOAfBtAP/ZwWNqADBIJiLKIPZJJiLKIyJyUClVZvr5WAAfAqgE4AXwAoAekZtvVkq9LyKrAIwBUA9gIYBfAHgEwFkASgD8Uin1m077I4iIigCDZCKiPGINkiPb9gIYDeAAgDalVIuIjADwe6XUJBE5C8AdSqkLI/efCaC/UupBESkB8HcAlyql6jv1jyEiKmCuXO8AERF1SCJf3QCeFpHxAEIARsa5/7kAxonIv0V+7gVgBMKZZiIiSgCDZCKiPBYptwgB2IlwbfIOACciPKekJd7DAMxWSv2pU3aSiKgIceIeEVGeEpF+AH4N4GkVro3rBWCbUqoNwFUAnJG7HgDQ0/TQPwG4UUTckecZKSI9QERECWMmmYgov3QXkbUIl1YEEZ6o99+R254B8IqIXArgLwAORbZ/AiAoIusA/A+AJxHuePGxiAiAXQAu6qw/gIioGHDiHhERERGRBcstiIiIiIgsGCQTEREREVkwSCYiIiIismCQTERERERkwSCZiIiIiMiCQTIRERERkQWDZCIiIiIiCwbJREREREQW/x9mcZo7JzbV9AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 864x432 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 过滤出的数据使用灰色，所有的收盘价使用黑色，用matplotlib在十分之一和十分之九分位数位置画横线\n",
    "slb_close.plot(color='black', figsize=(12,6))\n",
    "slb_top_bottom_10.plot(color='lightgray', ms=4, marker='o', style=' ')\n",
    "xmin = criteria.index[0]\n",
    "xmax = criteria.index[-1]\n",
    "plt.hlines(y=[lower_10, upper_10], xmin=xmin, xmax=xmax,color='black')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 更多"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
